package com.whnk.pm.service.impl;

import java.util.List;

import com.whnk.pm.domain.ProcurementResource;
import com.whnk.pm.mapper.ProcurementResourceMapper;
import com.whnk.pm.service.IProcurementResourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.whnk.common.support.Convert;

/**
 * 采购资源 服务层实现
 * 
 * @author whwhnk
 * @date 2020-02-04
 */
@Service
public class ProcurementResourceServiceImpl implements IProcurementResourceService
{
	@Autowired
	private ProcurementResourceMapper procurementResourceMapper;

	/**
     * 查询采购资源信息
     * 
     * @param id 采购资源ID
     * @return 采购资源信息
     */
    @Override
	public ProcurementResource selectProcurementResourceById(Integer id)
	{
	    return procurementResourceMapper.selectProcurementResourceById(id);
	}
	
	/**
     * 查询采购资源列表
     * 
     * @param procurementResource 采购资源信息
     * @return 采购资源集合
     */
	@Override
	public List<ProcurementResource> selectProcurementResourceList(ProcurementResource procurementResource)
	{
	    return procurementResourceMapper.selectProcurementResourceList(procurementResource);
	}
	
    /**
     * 新增采购资源
     * 
     * @param procurementResource 采购资源信息
     * @return 结果
     */
	@Override
	public int insertProcurementResource(ProcurementResource procurementResource)
	{
	    return procurementResourceMapper.insertProcurementResource(procurementResource);
	}
	
	/**
     * 修改采购资源
     * 
     * @param procurementResource 采购资源信息
     * @return 结果
     */
	@Override
	public int updateProcurementResource(ProcurementResource procurementResource)
	{
	    return procurementResourceMapper.updateProcurementResource(procurementResource);
	}

	/**
     * 删除采购资源对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteProcurementResourceByIds(String ids)
	{
		return procurementResourceMapper.deleteProcurementResourceByIds(Convert.toStrArray(ids));
	}
	
}
